package com.ftg.learn.Controller;


import com.ftg.learn.Pojo.Dept;
import com.ftg.learn.Service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController

public class DemoController {
    @Autowired

   DemoService demoService;

    @GetMapping("/showall")
    public List<Dept> showall() {

        return demoService.showall();
    }

    @GetMapping("/hello")
    public String hellow(){
        return "hello world!!!8081第一个服务器";
    }

}
